package com.honor.games.wg.events;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.google.common.eventbus.Subscribe;
import com.honor.games.wg.services.WGSelectorServices;

@Service
public class UnitEventManager {

	@Autowired
	WGSelectorServices selectorServices;
	
	private static Logger logger = LoggerFactory.getLogger(UnitEventManager.class); 
	
	@Subscribe
	public void handleUnitClickedEvent(UnitClickedEvent event) {
		logger.trace("Unit clicked - START");
		
		selectorServices.selectUnit(event.getUnit());
		
		logger.trace("Unit clicked - STOP");
	}

	@Subscribe
	public void handleUnitMoveCommandEvent(UnitMoveCommandEvent event) {
		logger.trace("Unit move command event - START");
		logger.trace("Unit move command event - STOP");
	}
	
}
